package edu.hubu.book.domain;

import java.io.Serializable;

public class Book implements Serializable {
    /**
     * 图书的id
     */
    protected int bid;
    /**
     * 图书的名称
     */
    protected String bookName;
    /**
     * 图书的图片路径
     */
    protected String imgUrl;
    /**
     * 图书的价格
     */
    protected double price;
    /**
     * 图书的折扣
     */
    protected double discount;
    /**
     * 图书的作者
     */
    protected String author;
    /**
     * 图书的出版社
     */
    protected String publishingHouse;
    /**
     * 图书的一级分类
     */
    protected int sid;
    /**
     * 图书的二级分类
     */
    protected int ssid;

    protected String description;

    public Book() {

    }

    public Book(String bookName, String imgUrl, double price, double discount, String author, String publishingHouse, int sid, int ssid, String description) {
        this.bookName = bookName;
        this.imgUrl = imgUrl;
        this.price = price;
        this.discount = discount;
        this.author = author;
        this.publishingHouse = publishingHouse;
        this.sid = sid;
        this.ssid = ssid;
        this.description = description;
    }

    public Book(int bid, String bookName, String imgUrl, double price, double discount, String author, String publishingHouse, int sid, int ssid, String description) {
        this.bid = bid;
        this.bookName = bookName;
        this.imgUrl = imgUrl;
        this.price = price;
        this.discount = discount;
        this.author = author;
        this.publishingHouse = publishingHouse;
        this.sid = sid;
        this.ssid = ssid;
        this.description = description;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bid=" + bid +
                ", bookName='" + bookName + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                ", price=" + price +
                ", discount=" + discount +
                ", author='" + author + '\'' +
                ", publishingHouse='" + publishingHouse + '\'' +
                ", sid=" + sid +
                ", ssid=" + ssid +
                ", description='" + description + '\'' +
                '}';
    }

    public int getBid() {
        return bid;
    }

    public void setBid(int bid) {
        this.bid = bid;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublishingHouse() {
        return publishingHouse;
    }

    public void setPublishingHouse(String publishingHouse) {
        this.publishingHouse = publishingHouse;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public int getSsid() {
        return ssid;
    }

    public void setSsid(int ssid) {
        this.ssid = ssid;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
